<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>


    <script>
        var sum = 1;
        var content = 0;
        document.write('1-100内能被3整除，不能被5整除的数字' + '<br>');
        for (var i = 1; i <= 100; i++) {
            if (i % 3 == 0 && i % 5 != 0) {
                document.write(i+' ');
                content++;
                if (content % 5 == 0) {
                    document.write('<br>');
                }
            }
        }
    </script>
</body>

</html>